package com.wsd.jing.annotation;

import java.lang.annotation.ElementType;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;

/**
 * All rights Reserved, Designed By www.tom.com
 *
 * @author tom
 * @version 1.0.0
 * @projectName: jing
 * @packageName: com.wsd.jing.annotation
 * @className: DataPermission
 * @description 用户数据权限注解
 * @createDate 2024/6/4 14:39
 * @copyright 2024/6/4 14:39 www.tom.com Inc. All rights reserved.
 */
@Target({ElementType.METHOD, ElementType.TYPE})
@Retention(RetentionPolicy.RUNTIME)
public @interface DataPermission {

    /**
     * 是否启用
     *
     * @return
     */
    boolean enabled() default true;

    /**
     * 表别名
     *
     * @return
     */
    String tableAlias() default "";

    /**
     * 部门权限控制字段
     *
     * @return
     */
    String departmentFiled() default "department_id";

    /**
     * 创建人控制字段
     *
     * @return
     */

    String creatorFiled() default "creator_id";
}
